package com.wnxy.carl.api;

import com.wnxy.carl.param.*;
import com.wnxy.carl.response.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "carlUserServe",contextId = "UserApi",path = "user")
@Api(tags = "用户信息操作接口",description = "提供 User api接口")
public interface UserApi {
    @ApiOperation("密码登陆")
    @PostMapping("passwordLogin")//密码登陆 LoginDTO
    public Result accountLogin(@RequestBody PasswordParam accountParam);
    @ApiOperation("短信登陆")
    @PostMapping("shortMessageLogin")//短信登陆 LoginDTO
    public Result shortMessageLogin(@RequestBody ShortMessageParam shortMessageParam);
    @ApiOperation("发送短信验证码")
    @GetMapping("sendMessageCode")//发送短信验证码 Boolean
    public Result sendMessageCode(@RequestParam("phone") String phone);
    @ApiOperation("验证手机号")
    @GetMapping("checkPhone")//验证手机号 Boolean
    public Result checkPhone(@RequestParam("phone") String phone);
    @ApiOperation("注册账号")
    @PostMapping("register")//注册账号 RegisterDTO
    public Result register(@RequestBody RegisterParam registerParam);
    @ApiOperation("修改密码")
    @PostMapping("amendPassword")//修改密码 String
    public Result amendPassword(@RequestBody AmendPasswordParam amendPasswordParam);
    @ApiOperation("查看我的信息")
    @GetMapping("myMessage")//查看我的信息 MyMessageDTO
    public Result myMessage(@RequestParam("userId") Integer userId);
    @ApiOperation("修改我的信息")
    @PostMapping("amendMessage")//修改我的信息 MyMessageDTO
    public Result amendMessage(@RequestBody AmendMessageParam amendMessageParam);
    @ApiOperation("验证身份证")
    @GetMapping("checkIdCard")//验证身份证 Boolean
    public Result checkIdCard(@RequestParam("idcard") String idcard);
    @ApiOperation("修改积分")
    @PutMapping("andminAmendUser")//修改积分，状态， UserDTO
    public Result andminAmendUser(@RequestBody AndminAmendParam andminAmendParam);
    @ApiOperation("管理员修改用户信息")
    @GetMapping("andminSeeUser")//管理员修改用户信息 UserDTO
    public Result andminSeeUser(@RequestParam("userId") Integer userId);



}
